﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using OOAD_Project_Engine.Foundation;
using OOAD_Project_Engine.Foundation.Interfaces;
using OOAD_Project_Engine.Foundation.MyEventArgs;

namespace OOAD_Project_Engine.Foundation.Interfaces
{
    public interface IEntityComponentCollection : ICollection<IEntityComponent>
    {
        T Find<T>() where T : IEntityComponent;
        List<T> FindAll<T>() where T : IEntityComponent;
        bool Contains<T>() where T : IEntityComponent;
        bool Remove<T>() where T : IEntityComponent;
        //bool Remove(IEntityComponent component);
        bool RemoveImmediate(IEntityComponent component);
        IEntityComponent this[Type key] { get; }
        void Initialize();
        event EventHandler<EntityComponentEventArgs> ComponentAdded;
        event EventHandler<EntityComponentEventArgs> ComponentRemoved;
        //void LoadEntityComponent(IEntityComponent c);
        //void UnloadEntityComponent(IEntityComponent c);
    }
}
